import Vue from 'vue'

// import intercept from './intercept'
import VueRouter from 'vue-router'
Vue.use(VueRouter)
const routerPush = VueRouter.prototype.push
VueRouter.prototype.push = function push(location) {
    return routerPush.call(this, location).catch(error => error)
};

import Home from '@/views'

const routes = [{
    path: '/',
    redirect: '/home'
}, {
    path: '/home',
    component: Home
}, ];
const BUILD_ENV = process.env.BUILD_ENV
const router = new VueRouter({
    // mode: BUILD_ENV == 'runtime' ? '' : 'history',
    // mode: 'history',
    routes
})
export default router